#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;


int& count()
{
	int n = 0;
	n++;
	return n;
}

int main()
{
	int ret = count();
	cout << ret << endl;
	cout << ret << endl;
	cout << ret << endl;
	cout << ret << endl;

	//cout << ret << endl;

	int& ret1 = count();
	cout << ret1 << endl;
	cout << ret1 << endl;
	cout << ret1 << endl;
	cout << ret1 << endl;

	return 0;
}